To identify something exactly; to arrive at exactly the right answer.
He hit the nail on the head when he said the problem was the thermostat.